from enum import Enum


class ResponseCodeEnum(Enum):
    CODE_200 = (200, "\u8bf7\u6c42\u6210\u529f")  # 请求成功
    CODE_404 = (404, "\u8bf7\u6c42\u5730\u5740\u4e0d\u5b58\u5728")  # 请求地址不存在
    CODE_600 = (600, "\u8bf7\u6c42\u53c2\u6570\u9519\u8bef")  # 请求参数错误
    CODE_601 = (601, "\u4fe1\u606f\u5df2\u7ecf\u5b58\u5728")  # 信息已经存在
    CODE_500 = (
        500, "\u670d\u52a1\u5668\u8fd4\u56de\u9519\u8bef\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458")  # 服务器返回错误，请联系管理员

    def __init__(self, code, msg):
        self._code = code
        self._msg = msg

    @property
    def code(self):
        return self._code

    @property
    def msg(self):
        return self._msg
